package com.cadre.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cadre.dao.PictureMapper;
import com.cadre.entity.Picture;



@Service
@Transactional
public class PictureServiceImpl {
	 @Autowired
	   private PictureMapper picturemapper;
	 /*
	  *上传并添加到数据库
	  */
	 public boolean addPicture(Picture pic){
		 if(pic==null&&equals("")){
			return false;
		 }
		 return this.picturemapper.addPicture(pic);
		 
	 }
	 
	 /*
	  * 遍历所有东西
	  */
	 public List<Picture> SelectALLPicture(){
		return this.picturemapper.SelectALLPicture();
		 
	 }
	
}
